import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import '@/styles/index.scss' // global css

import App from './App'
import store from './store'
import router from './router'

import '@/icons' // icon
import '@/permission' // permission control

import SearchForm from '@/components/SearchForm' // 全局组件
Vue.component('SearchForm', SearchForm)

Vue.use(ElementUI, { size: 'mini' })
Vue.config.productionTip = false

import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
Vue.use(Viewer)

new Vue({
  el: '#app',
  router,
  store,
  beforeCreate() {
    // 注册全局事件总线$bus
    Vue.prototype.$bus = this
  },
  render: (h) => h(App)
})
